package com.gugee.ins.data.collector.media.config;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * DataConsumerConfig
 * @author Huangxin
 */
@Configuration
@Getter
@Setter
public class InsMediaConfig {

    /**
     * 数据查询时间范围
     */
    @NacosValue(value = "${ins.data.collector.query.latestDays:30}", autoRefreshed = true)
    int latestDays;

    /**
     * 日志打印时间要求
     */
    @NacosValue(value="${ins.data.collector.media.logTime.debug.limit:50}", autoRefreshed = true)
    long mediaDebugTimeLimit;

    /**
     * 日志打印时间要求
     */
    @NacosValue(value="${ins.data.collector.insAdMediaIdentify.logTime.debug.limit:50}", autoRefreshed = true)
    long insAdMediaIdentifyDebugTimeLimit;

    /**
     * insMedia 主线程池数
     */
    @Value(value="${ins.data.threadpools.insMedia.corePollSize}")
    int insMediaCorePollSize;

    /**
     * insMedia 主线程池数
     */
    @Value(value="${ins.data.threadpools.insAppProductMedia.corePollSize}")
    int insAppProductMediaCorePollSize;

    /**
     * 广告帖子识别 主线程池数
     */
    @Value(value="${ins.data.threadpools.insAdMediaIdentify.corePollSize}")
    int insAdMediaIdentifyCorePollSize;

    /**
     * insMedia kafka topic
     */
    @Value(value="${kafka.topics.insMedia.online}")
    String insMediaOnlineTopic;

    /**
     * insAdMediaIdentify kafka topic
     */
    @Value(value="${kafka.topics.insAdMediaIdentify.priority}")
    String insAdMediaIdentifyPriorityTopic;

    /**
     * insAnalysisMediaScore kafka topic
     */
    @Value(value="${kafka.topics.insAnalysisMediaScore.online}")
    String insAnalysisMediaScoreOnlineTopic;

    /**
     * insComment kafka topic
     */
    @Value(value="${kafka.topics.insCommentCollect.priority}")
    String insCommentCollectPriorityTopic;

    /**
     * insBloggerPriority kafka topic
     */
    @Value(value="${kafka.topics.insBloggerPriorityCollect.online}")
    String insBloggerPriorityCollectOnlineTopic;

    /**
     * insMBloggerMediaAdSt kafka topic
     */
    @Value(value="${kafka.topics.insMBloggerMediaAdSt.priority}")
    String insMBloggerMediaAdStPriorityTopic;

    /**
     * insBloggerUpdateOnlineTopic kafka topic
     */
    @Value(value="${kafka.topics.insBloggerUpdate.online}")
    String insBloggerUpdateOnlineTopic;

    /**
     * insAppProductMedia kafka topic
     */
    @Value(value="${kafka.topics.insAppProductMedia.online}")
    String insAppProductMediaOnlineTopic;

    /**
     * insAnalysisCategoryOnlineTopic kafka topic
     */
    @Value(value="${kafka.topics.insAnalysisCategory.online}")
    String insAnalysisCategoryOnlineTopic;

    /**
     * insAnalysisProductCategory kafka topic
     */
    @Value(value="${kafka.topics.insAnalysisProductCategory.online}")
    String insAnalysisProductCategoryOnlineTopic;

    /**
     * insMedia 消息重发最大次数
     */
    @NacosValue(value="${ins.data.collector.message.insMedia.retry:1}", autoRefreshed = true)
    int insMediaRetryTimes;

    /**
     * insAdMediaIdentify 消息重发最大次数
     */
    @NacosValue(value="${ins.data.collector.message.insAdMediaIdentify.retry:1}", autoRefreshed = true)
    int insAdMediaIdentifyRetryTimes;

    /**
     * insAnalysisMediaScore 消息重发最大次数
     */
    @NacosValue(value="${ins.data.collector.message.insAnalysisMediaScore.retry:1}", autoRefreshed = true)
    int insAnalysisMediaScoreRetryTimes;

    /**
     * insBloggerPriority 消息重发最大次数
     */
    @NacosValue(value="${ins.data.collector.message.insBloggerPriority.retry:1}", autoRefreshed = true)
    int insBloggerPriorityRetryTimes;

    /**
     * insComment 消息重发最大次数
     */
    @NacosValue(value="${ins.data.collector.message.insCommentPriority.retry:1}", autoRefreshed = true)
    int insCommentPriorityRetryTimes;

    /**
     * insMBloggerMediaAdStPriority 消息重发最大次数
     */
    @NacosValue(value="${ins.data.collector.message.insMBloggerMediaAdStPriority.retry:1}", autoRefreshed = true)
    int insMBloggerMediaAdStPriorityRetryTimes;

    /**
     * insAppProductMedia 消息重发最大次数
     */
    @NacosValue(value="${ins.data.collector.message.insAppProductMedia.retry:1}", autoRefreshed = true)
    int insAppProductMediaRetryTimes;

    /**
     * insAnalysisCategory 消息重发最大次数
     */
    @NacosValue(value="${ins.data.collector.message.insAnalysisCategory.retry:1}", autoRefreshed = true)
    int insAnalysisCategoryRetryTimes;

    /**
     * insMedia 消息时限范围
     */
    @NacosValue(value="${ins.data.collector.insMedia.accept.minTime.limit:1440}", autoRefreshed = true)
    int acceptInsMediaMsgTimeMinRange;

    /**
     * insAdMediaIdentify 消息时限范围
     */
    @NacosValue(value="${ins.data.collector.insAdMediaIdentify.accept.minTime.limit:1440}", autoRefreshed = true)
    int acceptInsAdMediaIdentifyMsgTimeMinRange;

    /**
     * insAppProductMedia 消息时限范围
     */
    @NacosValue(value="${ins.data.collector.insAppProductMedia.accept.minTime.limit:1440}", autoRefreshed = true)
    int acceptInsAppProductMediaMsgTimeMinRange;

    /**
     * insMiddleBloggerMedia 消息时限范围
     */
    @NacosValue(value="${ins.data.collector.insMiddleBloggerMedia.accept.minTime.limit:1440}", autoRefreshed = true)
    int acceptInsMiddleBloggerMediaMsgTimeMinRange;

    /**
     * 每次爬取帖子列表的条数，0：默认值
     */
    @NacosValue(value="${ins.spider.media.each.count:0}", autoRefreshed = true)
    int insSpiderMediaEachCount;

    /**
     * 帖子采集时的最小关帖子数
     */
    @NacosValue(value="${ins.data.collector.insMedia.min.count:0}", autoRefreshed = true)
    int insMediaMinCount;

    /**
     * 帖子采集更新后,一定时间内不再采集 单位天
     */
    @NacosValue(value="${ins.data.collector.insMedia.intervals.day:2}", autoRefreshed = true)
    int insMediaIntervalDay;

    /**
     * 中播主帖子采集更新后,一定时间内不再采集 单位天
     */
    @NacosValue(value="${ins.data.collector.insMiddleBloggerMedia.intervals.day:7}", autoRefreshed = true)
    int insMiddleBloggerMediaIntervalDay;

    /**
     * 帖子标记商品采集更新后,一定时间内不再采集 单位小时
     */
    @NacosValue(value="${ins.data.collector.insProductMedia.intervals.hour:48}", autoRefreshed = true)
    int insProductMediaIntervalHour;

    /**
     * 评论采集更新后,一定时间内不再采集 单位天
     */
    @NacosValue(value="${ins.data.collector.insComment.intervals.day:3}", autoRefreshed = true)
    int insCommentIntervalDay;


    @NacosValue(value = "${ins.es.product.index:ins_product}", autoRefreshed = true)
    String productIndex;
}
